﻿@*统一工具条模板*@
<table class="listTitle">
    <tr>
        <td width="15">
            <img alt="" src="/images/filesave.png" />
        </td>
        <td width="300">
            @{
                var panelTitle = ViewData["PanelTitle"] == null ? "列表" : ViewData["PanelTitle"].ToString();
                @panelTitle
            }
        </td>
        <td align="right">
            @{
                var showAddButton = ViewData["ShowAddButton"] == null ? false : (bool)ViewData["ShowAddButton"];
                if (showAddButton == true)
                {
                <input id="btnAdd" type="button" value=" 新 增 " class="button" onclick="btnAdd_Click()" />
                }
                var showDeleteButton = ViewData["ShowDeleteButton"] == null ? false : (bool)ViewData["ShowDeleteButton"];
                if (showDeleteButton == true)
                {
                <input id="btnDelete" type="button" value=" 删 除 " class="button" onclick="btnDelete_Click()" />
                }
                var showSaveButton = ViewData["ShowSaveButton"] == null ? false : (bool)ViewData["ShowSaveButton"];
                if (showSaveButton == true)
                {
                <input id="btnSave" type="button" value=" 保 存 " class="button" onclick="btnSave_Click()" />
                }
                var showOtherButton = ViewData["ShowOtherButton"] == null ? false : (bool)ViewData["ShowOtherButton"];
                if (showOtherButton == true)
                {
                    var otherButtonID = ViewData["OtherButtonID"] == null ? "otherButton" : ViewData["OtherButtonID"].ToString();
                    var otherButtonValue = ViewData["OtherButtonValue"] == null ? "其他按钮" : ViewData["OtherButtonValue"].ToString();
                    var otherButtonClick = ViewData["OtherButtonClick"] == null ? "javascript:void(0)" : ViewData["OtherButtonClick"].ToString();
                <input id="@otherButtonID" type="button" value="@otherButtonValue" class="button" onclick="@otherButtonClick" />
                }

                var showBackButton = ViewData["ShowBackButton"] == null ? false : (bool)ViewData["ShowBackButton"];
                if (showBackButton == true)
                {
                <input id="btnBack" type="button" value=" 返 回 " class="button" onclick="btnBack_Click()" />
                }
                var showCloseButton = ViewData["ShowCloseButton"] == null ? false : (bool)ViewData["ShowCloseButton"];
                if (showCloseButton == true)
                {
                <input id="btnClose" type="button" value=" 关 闭 " class="button" onclick="btnClose_Click()" />
                }
               
            }
        </td>
    </tr>
</table>
